<script>
/* eslint-disable */
import { Line } from 'vue-chartjs'
import zoom from 'chartjs-plugin-zoom'
import chartJsPluginErrorBars from 'chartjs-plugin-error-bars'

export default {
  extends: Line,

  props: ['data', 'options'],

  mounted() {
    this.addPlugin(chartJsPluginErrorBars)
    this.addPlugin(zoom)
    this.renderChart(this.data, this.options)
    // this.renderChart({
    //   labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],
    //   datasets: [
    //     {
    //       label: 'Data One',
    //       backgroundColor: '#FC2525',
    //       data: [40, 39, 10, 40, 39, 80, 40],
    //       fill:false
    //     },{
    //       label: 'Data Two',
    //       backgroundColor: '#05CBE1',
    //       data: [60, 55, 32, 10, 2, 12, 53],
    //       fill:false
    //     }
    //   ]
    // }, {responsive: true, maintainAspectRatio: false})
    console.log('data', this.data);
  },

  watch: {
    data() {
      this.renderChart(this.data, this.options)
    }
  }
}
</script>
